package com.xbongbong.workflow.domain.dao;

import com.xbongbong.workflow.domain.entity.WorkflowBackupDataEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface WorkflowBackupDataDao {
    Long insert(WorkflowBackupDataEntity entity);

    void insertBatch(List<WorkflowBackupDataEntity> list);

    WorkflowBackupDataEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(WorkflowBackupDataEntity entity);

    List<WorkflowBackupDataEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    WorkflowBackupDataEntity getByTaskId(@Param("taskId") Long taskId, @Param("corpid") String corpid);

    void deleteByTaskIds(@Param("corpid") String corpid, @Param("taskIds") List<Long> taskIds);
}